<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/extras/spring-security5">>
<head>
    <title>首页</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>

<div style="text-align: center;margin:0 auto;width: 1000px; ">
    <a href="/"><img src="../static/image/spring-boot.png" th:width="350" th:height="160"/></a>
    <!--/*@thymesVar id="account" type=""*/-->

        <h3 style="display: inline">欢迎用户：</h3>
        <span sec:authentication="account"></span>
        <h3 th:text="${account}" style="display: inline; color: crimson"></h3>

    <div>

        <a href="/login">
            <button>登录</button>
        </a>

    </div>

<div style="text-align: center;margin:0 auto;width: 650px; ">
    <table width="100%" border="1" cellspacing="1" cellpadding="0">
        <tr>
            <td><strong>头像</strong></td>
            <td><strong>ID</strong></td>
            <td><strong>姓名</strong></td>
            <td><strong>年龄</strong></td>
        </tr>
        <!--/*@thymesVar id="users" type=""*/-->
        <tr th:each="user : ${users}">
            <td><!--/*@thymesVar id="avatar" type=""*/-->
                <img th:src="@{/user.avatar}" th:width="30" th:height="30"></td>
            <td th:text="@{/user.id}"></td>
            <td th:text="${user.name}"></td>
            <td th:text="${user.age}"></td>
        </tr>
    </table>
</div>

</body>
</html>